<template>
	<view class="fui-picture" :style="'background:' + diyitem.style.background + ';padding-left' + diyitem.style.paddingleft + ';padding-top' + diyitem.style.paddingtop">
		<view
			@tap="navigate"
			:data-appid="childitem.appid"
			:data-appurl="childitem.appurl"
			:data-phone="childitem.phone"
			:data-url="childitem.linkurl"
			:style="'padding:' + diyitem.style.paddingtop + 'rpx' + ' ' + diyitem.style.paddingleft + 'rpx'"
			v-for="(childitem, index) in diyitem.data"
			:key="index">
			<image
				mode="widthFix"
				:src="childitem.imgurl"
				:style="bannerheight ? 'height:' + bannerheight + 'px' : 'height:auto' + ';padding-bottom: 1% ; margin-top: 2%;'"
			></image>
		</view>
	</view>
</template>
<script>
export default {
	props: {
		diyitem: {
			type: Object
		},
		bannerheight: ''
	},
	data() {
		return {
			show: false
		};
	},
	methods: {
		navigate(e) {
			uni.navigateTo({
				url: e.currentTarget.dataset.url,
				fail() {
					uni.switchTab({
						url: e.currentTarget.dataset.url
					});
				}
			});
		}
	}
};
</script>
<style>
.fui-picture{
	width: 100%;
}
.fui-picture image {
	width: 100%;
	margin-top: 0 !important;
	display: block !important;
	padding-bottom: 0 !important;
}
</style>
